
/**
 * @file EGM08Model.hpp
 */

#ifndef EGM08_MODEL_HPP
#define EGM08_MODEL_HPP

#include "EGMModel.hpp"

namespace gpstk
{
    /** @addtogroup GeoDynamics */
    //@{

    /** EGM08 Model.
     *
     */
    class EGM08Model : public EGMModel
    {
    public:
        /** Constructor
         * @param n    Desired degree
         * @param m    Desired order
         */
        EGM08Model (int n = 0, int m = 0)
            : EGMModel(n, m)
        {
            // model name
            egmData.modelName = "EGM2008";

            // earth gravitation constant
            egmData.GM = 3.9860044150e+14;

            // radius
            egmData.ae = 6378136.3;

            // tide free
            egmData.includesPermTide = false;

            // reference epoch
            egmData.refMJD =  51544.5;

        };  // End of constructor


        /// Default destructor
        virtual ~EGM08Model() {};


        /// Load file
        void loadFile(const std::string& file)
            noexcept(false);


        /** Compute acceleration (and related partial derivatives) of Earth
         *  Gravitation.
         * @param tt        TT
         * @param orbits    orbits
         */
        virtual void Compute( const CommonTime&   tt,
                              const satVectorMap& orbits );


        /// Return the force model name
        inline virtual std::string modelName() const
        { return egmData.modelName; }


    }; // End of class 'EGM08Model'

    // @}

}  // End of namespace 'gpstk'

#endif   // EGM08_MODEL_HPP
